<script>
$(function() {
	$( "#tabs" ).tabs({
	    select: function(event, ui) {
	        var url = $.data(ui.tab, 'load.tabs');
	        if( url ) {
	            location.href = url;
	            return false;
	        }
	        return true;
	    },
	selected: 0
	});
});
</script>
<div id="tabs">
	<ul>
            <li><a href='#pt'>Đoàn phí sinh viên</a> </li>
            <li><?php echo $this->Html->link(__('Đoàn phí cán bộ', true), array('controller'=>'doanphicbs','action' => 'index')); ?></li>
           
    </ul>
<div class="doanphisvs index">
	<h2 style="text-align: center"><?php __('Đoàn phí các tháng của sinh viên');?></h2>
	<?php echo $form->create('Doanphisv')?>
	<?php echo $this->Form->input('namhoc_id',array('id'=>'namhoc','label'=>'Năm Học'));?>
	<?php echo $html->link('Cập nhật đoàn phí',array('action'=>'suadoanp'))?>
	<?php echo $form->end();?>
	<div id='ttdp'>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo 'STT';?></th>
			<th><?php echo 'Tháng';?></th>
			<th><?php echo 'Số Tiền';?></th>
			<!--<th class="actions"><?php //__('Thao Tác');?></th>-->
	</tr>
	<?php
	$i = 0;
	foreach ($doanphisvs as $doanphisv):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		<td>
			<?php echo $doanphisv['Thang']['thang']; ?>
		</td>
		<td><?php echo number_format($doanphisv['Doanphisv']['sotien'],0,',','.'); ?>&nbsp;</td>
		<!--<td class="actions">
			<?php //echo $this->Html->link(__('Sửa', true), array('action' => 'edit', $doanphisv['Doanphisv']['id'])); ?>
		</td>-->
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
</div>
<?php
$js->get('#namhoc')->event('change',$js->request(array('controller'=>'doanphisvs','action'=>'laydoanphi'),
							array('update'=>'#ttdp','async' => true,'dataExpression'=>true,'method'=>'post',
							'data'=>$js->serializeForm(array('isForm'=>false,'inline'=>true))))); 
?>